﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_Flow_GetDocumentStatus]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_Flow_GetDocumentStatus];
GO
CREATE PROCEDURE [dbo].[sproc_Flow_GetDocumentStatus]
    @DocID int
AS
DECLARE @Status int

SELECT @Status = Doc_Status 
    FROM uds_flow_document
    WHERE doc_id = @DocID    
RETURN @Status